<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <style>
      .container {
        background-color: #f1f1f1;
        font-size: 15px;
        line-height: 2;
      }

      .left {
        float: left;
      }

      .bfc {
        overflow: hidden;
        /* 触发元素 BFC */
      }
    </style>
  </head>

  <body>
    <div
      id="divParent"
      style="padding: 8px; background-color: #aaa; position: relative"
    >
      <div
        id="divDisplay"
        style="
          background-color: #0f0;
          margin: 30px;
          padding: 10px;
          position: relative;
          height: 200px;
          width: 200px;
          border: solid 3px #f00;
        "
      ></div>
    </div>
  </body>
  <script src="index.js" type="module"></script>
</html>
